<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <h4>使用默认模板引擎 format 模式 仅支持一级属性取值</h4>
        <select class="form-control" data-toggle="yulu-list" data-init-load="true"
                 data-ajax-url="data.json" data-ajax-type="get" data-ajax-data-field="data">
            <option data-toggle="yulu-template" value="{id}">{name}</option>
        </select>

        <h4>使用百度模板引擎</h4>
        <select class="form-control" data-toggle="yulu-list" data-init-load="true" data-yulu-list-template-factory="baidu"
                data-ajax-url="data.json" data-ajax-type="get" data-ajax-data-field="data">
            <option value="">--请选择分类--</option>
            <option data-toggle="yulu-template" value="{{=id}}">{{=name}}</option>
        </select>

        <h4>使用artTemplate</h4>
        <select class="form-control" data-toggle="yulu-list" data-init-load="true" data-yulu-list-template-factory="artTemplate"
                data-ajax-url="data.json" data-ajax-type="get" data-ajax-data-field="data">
            <option value="">--请选择分类--</option>
            <option data-toggle="yulu-template" value="{{id}}">{{name}}</option>
        </select>

    </div>
    <script src="http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="../src/yulubase.core.js"></script>
    <script src="../src/yulubase.ajax.js"></script>
    <script src="../src/yulubase.ui.js"></script>
    <script src="../src/yulubase.ui.plugins.js"></script>

    <!--百度模版-->
    <script src="http://wangxiao.github.com/BaiduTemplate/debug/js/baiduTemplate.js"></script>
    <script>
        // 当前版本展不支持baidu默认模板格式 需要将其转换为非<>模式
        baidu.template.LEFT_DELIMITER='{{';
        baidu.template.RIGHT_DELIMITER='}}';
    </script>
    <!--artTemplate-->
    <script src="../src/template.js"></script>
</body>
</html>